::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-thumb {
  border-radius: 10px;
  background-color: var(--color-control-lightgray);
}

#search-home-layout {
  position: relative;
  width: 100%;
  display: flex;
  color: var(--color-control-white)
}

#search-overlay {
  color: var(--color-control-white)
}

#search-box {
  position: absolute;
  top: 32px;
  left: -15px;
  width: 0px;
  z-index: 2;
  opacity: 0;
  transition: opacity 200ms ease-in, width 400ms ease-in-out;
}

#search-box > input {
  padding-left: 10px;
  border: none;
  border-radius: 5px;
}

#home-panel:has(#search-nav-btn:hover) #search-box {
  opacity: 1;
  width: 250px;
}

#search-box:hover {
  opacity: 1;
  width: 250px;
}

#search-results {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  grid-auto-rows: max-content;
  gap: 7px;
  width: -webkit-fill-available;
  overflow-y: auto;
  overflow-x: hidden;
}

#search-error,
#search-noresults {
  display: none;
  align-items: center;
  flex-direction: column;
  gap: 5px;
  position: absolute;
  top: 50%;
  left: 50%;
  font-size: 2rem;
  text-align: center;
  transform: translate(-50%, -50%);
}

.result-glyph {
  font-size: 4rem;
}

#search-clear-btn {
  background-color: var(--color-system-accent-trans);
}

.result-tile {
  position: relative;
  border: 2px solid transparent;
  border-radius: 5px;
  aspect-ratio: 2/3;
  background-color: var(--color-control-darkgray);
  cursor: pointer;
  transition: border-color 200ms ease-out;
}

.result-tile:hover {
  border-color: var(--color-system-accent);
}

.result-details {
  position: absolute;
  display: flex;
  flex-direction: column;
  font-size: 1.2rem;
  padding: 3px;
  width: 100%;
  height: 100%;
}

.result-poster {
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 5px;
  opacity: 1;
  transition: opacity 400ms ease-out;
}

.result-title {
  display: -webkit-box;
  font-weight: 600;
  line-height: 1.4rem;
  word-break: break-word;
  -webkit-line-clamp: 5;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.result-tile:hover > .result-poster {
  opacity: 0;
  pointer-events: none;
}

.result-play {
  position: absolute;
  bottom: 5%;
  left: 5%;
  color: var(--color-control-white);
  transition: color 200ms ease-out;
}

.result-play:hover {
  color: var(--color-system-accent);
}

.result-episode {
  position: absolute;
  bottom: 5%;
  right: 5%;
  padding-inline: 7px;
  padding-block: 2px;
  font-size: 1.4rem;
  color: var(--color-control-white);
  background-color: var(--color-control-darkgray);
  border-radius: 5px;
}

#modal {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: 85%;
  max-height: 85%;
  padding: 8px;
  background-color: var(--color-control-part-trans);
  border: 1px solid var(--color-system-accent-trans);
  border-radius: 8px;
  box-shadow: 0px 0px 6px 0px var(--color-system-accent-trans);
  z-index: 2;
}

#search-overlay {
  display: none;
  position: fixed;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: -webkit-fill-available;
  height: -webkit-fill-available;
  background-color: var(--color-control-trans);
  backdrop-filter: blur(3px);
  z-index: 1;
}

#modal-header {
  display: flex;
  flex-direction: column;
  gap: 3px;
  margin-top: -5px;
}

#modal-title {
  font-weight: 600;
  font-size: 1.5rem;
  line-height: 1.7rem;
  overflow: hidden;
  text-wrap-mode: nowrap;
  text-overflow: ellipsis;
}

#modal-title-props {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: .9rem;
  font-weight: 100;
}

#modal-rating {
  flex-shrink: 0;
  font-size: .7rem;
  font-weight: 900;
  margin-right: 2px;
  padding: 1px 3px;
  border: 1px solid;
  border-radius: 1px;
}

#modal-media {
  flex-shrink: 0;
}

#modal-genre {
  overflow: hidden;
  text-wrap-mode: nowrap;
  text-overflow: ellipsis;
}

#modal-bookmark,
#modal-recommendations {
  transition: color 200ms ease-out;
}

#modal-bookmark:hover,
#modal-recommendations:hover {
  color: var(--color-system-accent)
}

.modal-title-dots {
  font-size: .2rem;
}

#modal-body {
  display: flex;
  gap: 8px;
  height: calc(100% - 100px);
  width: 100%;
}

#modal-poster-container {
  max-width: fit-content;
  width: -webkit-fill-available;
}

#modal-poster {
  border-radius: 5px;
  max-height: 100%;
  width: 100%;
  object-fit: contain;
}

#modal-noposter {
  display: none;
  align-items: center;
  font-size: 7rem;
  color: var(--color-control-darkgray);
  min-height: 0;
}

#modal-content {
  display: flex;
  flex-direction: column;
  gap: 3px;
  overflow-y: auto;
  width: -webkit-fill-available;
}

#modal-tagline {
  font-style: italic;
  font-weight: 500;
}

.modal-heading {
  font-size: 1.1rem;
}

#modal-overview {
  font-size: .9rem;
  font-weight: 500;
}

#modal-cast {
  font-size: .9rem;
  font-weight: 500;
}

#modal-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 5px;
}

#modal-tmdb-logo {
  height: 40px;
  cursor: pointer;
}

#modal-providers {
  display: flex;
  overflow-y: auto;
  gap: 8px;
}

.modal-provider-image {
  height: 40px;
  border-radius: 7px;
  cursor: pointer;
}

#next-page-btn {
  display: flex;
  font-size: 4rem;
  justify-content: center;
  align-items: center;
  color: var(--color-control-lightgray);
  background-color: transparent;
}

#next-page-btn:hover {
  border-color: transparent;
  color: var(--color-system-accent);
}

#advanced-log-text {
  border-radius: 5px;
  color: var(--color-control-white);
  background-color: var(--color-control-darkgray);
}